import request from '@/utils/request'

// 查询材质管理列表
export function listMatMgmt(query) {
  return request({
    url: '/business/matMgmt/list',
    method: 'get',
    params: query
  })
}

// 字段校验
export function getDoesItExist(query) {
  return request({
    url: '/business/matMgmt/getDoesItExist',
    method: 'get',
    params: query
  })
}

// 查询材质管理详细
export function getMatMgmt(id) {
  return request({
    url: '/business/matMgmt/' + id,
    method: 'get'
  })
}

// 新增材质管理
export function addMatMgmt(data) {
  return request({
    url: '/business/matMgmt',
    method: 'post',
    data: data
  })
}

// 修改材质管理
export function updateMatMgmt(data) {
  return request({
    url: '/business/matMgmt',
    method: 'put',
    data: data
  })
}

// 删除材质管理
export function delMatMgmt(id) {
  return request({
    url: '/business/matMgmt/' + id,
    method: 'delete'
  })
}


// 状态变更
export function updateChangeStatus(data){
  return request({
    url: '/business/matMgmt/changeStatus',
    method: 'put',
    params: data
  })
}

// 材质select
export function getNormalMatMgmtList(query){
  return request({
    url: '/business/matMgmt/getNormalMatMgmtList',
    method: 'get',
    params: query
  })
}

// 导出文件
export function exportExcel(data){
  return request({
    url: '/business/matMgmt/export',
    method: 'post',
    data: data
  })
}
